﻿
clothes = {

	usage = game
	selection_behavior = weighted_random
	fallback = default_clothes

	no_clothes = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = clothes
                template = no_clothes
                range = { 0 1 } # For the randomness to work correctly
            }
        }   
        outfit_tags = { no_clothes }
        weight = {
            base = 0
            modifier = {
                add = 1000
                should_be_fully_naked_portrait_trigger = yes
            }
            modifier = {
            	add = -1000
            	should_show_nudity = no
            }
        }
    }

    nightgown_western = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = western_sickness
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}
		outfit_tags = { no_clothes }
		weight = {
			base = 0
			modifier = {
				add = 110
				should_show_nudity = no
				should_be_naked_trigger = yes
			}
			modifier = {
            	add = -1000
            	should_show_nudity = yes
            }
            modifier = {
            	add = -50
				portrait_byzantine_clothing_trigger = no
				portrait_northern_clothing_trigger = no
				portrait_western_clothing_trigger = no
            }
		}
	}

	nightgown_mena = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = mena_sickness
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		outfit_tags = { no_clothes }
		weight = {
			base = 0
			modifier = {
				add = 110
				should_show_nudity = no
				should_be_naked_trigger = yes
			}
			modifier = {
            	add = -1000
            	should_show_nudity = yes
            }
            modifier = {
            	add = -50
				portrait_mena_clothing_trigger = no
				portrait_indian_clothing_trigger = no
				portrait_steppe_clothing_trigger = no
				portrait_african_clothing_trigger = no
            }
		}
	}

	default_clothes = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = clothes
                template = no_clothes
                range = { 0 1 } # For the randomness to work correctly
            }
        }   
        outfit_tags = { no_clothes }
        weight = {
            base = -100
        }
    }

	ruler_designer_clothes = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = clothes
                template = no_clothes
                range = { 0 1 }
            }
        }   
        weight = {
            base = 0
            modifier = {
            	add = 100
            	exists = scope:ruler_designer
            }
        }
    }

## So that the Prophet Muhammad does not have a portrait ## 

	no_portrait = {
		dna_modifiers = {
			accessory = {
				mode = add				
				gene = clothes
				template = no_clothes
				value = 0.5
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 2000
				this = character:33922
			}
		}
	}

## Small children ## 

	western_children = {

		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = western_children_commoner_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 100
				age < 4
			}
		}
	}

## DDE HRE ##

	dde_hre_commoners = {

		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = dde_hre_commoner_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 20
				highest_held_title_tier < tier_county
				NOR = {
					AND = {
						exists = primary_spouse
						primary_spouse = {
							highest_held_title_tier > tier_county
						}
					}
					AND = {
						has_government = republic_government
						primary_title.tier > 1
					}
					AND = { is_ruler = yes has_government = theocracy_government }
				}
				portrait_dde_hre_clothing_trigger = yes
			}
			# ## Exclude characters with the has_scripted_clothes flag, mostly used for developer characters
   #          modifier = {
   #              factor = 0
   #              has_character_flag = has_scripted_clothes
   #          }
		}
	}
	
	dde_hre_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = dde_hre_low_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						highest_held_title_tier = tier_county
						NOR = {
							# has_dynasty = no
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						portrait_dde_hre_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							highest_held_title_tier = tier_county
							NOR = {
								# has_dynasty = no
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_dde_hre_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	dde_hre_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = dde_hre_high_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						OR = {
							highest_held_title_tier = tier_duchy
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						NOT = { AND = { is_ruler = yes has_government = mercenary_government  } } # Blocked for mercenaries
						portrait_dde_hre_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							OR = {
								highest_held_title_tier = tier_duchy
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_dde_hre_clothing_trigger = yes
						}
					}
				}

			}
		}
	}
	
	dde_hre_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = dde_hre_war_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 102		# slightly stronger than western war
				portrait_wear_armor_trigger = yes
				portrait_dde_hre_clothing_trigger = yes
			}
		}
	}

## Western ##

	western_commoners = {

		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = western_commoner_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 20
				highest_held_title_tier < tier_county
				NOR = {
					AND = {
						exists = primary_spouse
						primary_spouse = {
							highest_held_title_tier > tier_county
						}
					}
					AND = {
						has_government = republic_government
						primary_title.tier > 1
					}
					AND = { is_ruler = yes has_government = theocracy_government }
				}
				portrait_western_clothing_trigger = yes
			}
		}
	}

	western_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = western_low_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						highest_held_title_tier = tier_county
						NOR = {
							# has_dynasty = no
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						portrait_western_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							highest_held_title_tier = tier_county
							NOR = {
								# has_dynasty = no
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_western_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	western_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = western_high_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						OR = {
							highest_held_title_tier = tier_duchy
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						NOT = { AND = { is_ruler = yes has_government = mercenary_government  } } # Blocked for mercenaries
						portrait_western_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							OR = {
								highest_held_title_tier = tier_duchy
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_western_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	western_royalty = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = western_royalty_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						highest_held_title_tier = tier_kingdom
						NOR = {
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						portrait_western_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							highest_held_title_tier = tier_kingdom
							NOR = {
								AND = {
								has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_western_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	western_imperial = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = western_imperial_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						highest_held_title_tier = tier_empire
						NOR = {
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						portrait_western_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							highest_held_title_tier = tier_empire
							NOR = {
								AND = {
								has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_western_clothing_trigger = yes
						}
					}
				}

			}
		}
	}


	western_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = western_war_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 101
				portrait_wear_armor_trigger = yes
				portrait_western_clothing_trigger = yes
			}
		}
	}


	western_crusades = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = western_crusades
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 110
				OR = {
				    AND = {
				        religion = religion:christianity_religion
				        has_government = holy_order_government
				    }
				    AND = {
				        religion = religion:christianity_religion
				        is_landed = no
				        portrait_wear_armor_trigger = yes
				        exists = liege
				        liege = {
				            has_government = holy_order_government
				        }
				    }
				    AND = {
				        religion = religion:christianity_religion
				        portrait_wear_armor_trigger = yes
				        OR = {
				            any_character_war = {
				                OR = {
				                    using_cb = undirected_great_holy_war
				                    using_cb = directed_great_holy_war
				                }
				                is_attacker = prev
				            }
				            any_liege_or_above = {
				                faith = prev.faith
				                any_character_war = {
				                    OR = {
				                        using_cb = undirected_great_holy_war
				                        using_cb = directed_great_holy_war
				                    }
				                    is_attacker = prev
				                }
				            }
				        }
				    }
				}
			}
		}
	}


	western_prison = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = western_prison
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
	    outfit_tags = { beggar_rags }
		weight = {
			base = 0
			modifier = {
				add = 500
				has_trait = peasant_leader
				OR = {
					is_ruler = no
					is_leading_faction_type = peasant_faction
					AND = {
						is_ruler = yes
						is_landed = no
						OR = {
							has_government = feudal_government
							has_government = clan_government
						}
					}
				}
				
				NOR = {
					portrait_mena_clothing_trigger = yes
					portrait_indian_clothing_trigger = yes
					portrait_steppe_clothing_trigger = yes
					portrait_african_clothing_trigger = yes
				}
			}
			modifier = {
				add = 120
				is_imprisoned = yes
				is_in_prison_type = dungeon
				OR = {
					portrait_byzantine_clothing_trigger = yes
					portrait_northern_clothing_trigger = yes
					portrait_western_clothing_trigger = yes
				}
			}
		}
	}


	western_sickness = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = western_sickness
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 110
				has_short_disease_trigger = yes #affliction that would plausibly leave them bedridden for treatment
				OR = {
					portrait_byzantine_clothing_trigger = yes
					portrait_northern_clothing_trigger = yes
					portrait_western_clothing_trigger = yes
				}
			}
		}
	}


	western_stealth = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = western_stealth
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 110
				has_character_flag = use_stealth_clothes
				OR = {
					portrait_byzantine_clothing_trigger = yes
					portrait_northern_clothing_trigger = yes
					portrait_western_clothing_trigger = yes
				}
			}
		}
	}



## Byzantine ##

	byzantine_commoners = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = byzantine_commoner_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 20
				highest_held_title_tier < tier_county
				NOR = {
					AND = {
						exists = primary_spouse
						primary_spouse = {
							highest_held_title_tier > tier_county
						}
					}
					AND = {
						has_government = republic_government
						primary_title.tier > 1
					}
					AND = { is_ruler = yes has_government = theocracy_government }
				}
				portrait_byzantine_clothing_trigger = yes
			}
		}
	}

	byzantine_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = byzantine_low_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						highest_held_title_tier = tier_county
						NOR = {
							# has_dynasty = no
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						portrait_byzantine_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							highest_held_title_tier = tier_county
							NOR = {
								# has_dynasty = no
								AND = {
								has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_byzantine_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	byzantine_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = byzantine_high_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}		
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						OR = {
							highest_held_title_tier > tier_county
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						NOT = { AND = { is_ruler = yes has_government = mercenary_government  } } # Blocked for mercenaries
						portrait_byzantine_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							OR = {
								highest_held_title_tier > tier_county
								AND = {
								has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_byzantine_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	byzantine_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = byzantine_war_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 101
				portrait_wear_armor_trigger = yes
				portrait_byzantine_clothing_trigger = yes
			}
		}
	}

## INDIAN ##

	indian_commoners = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = indian_commoner_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 20
				highest_held_title_tier < tier_county
				NOR = {
					AND = {
						exists = primary_spouse
						primary_spouse = {
							highest_held_title_tier > tier_county
						}
					}
					AND = {
						has_government = republic_government
						primary_title.tier > 1
					}
					AND = { is_ruler = yes has_government = theocracy_government }
				}
				portrait_indian_clothing_trigger = yes
			}
		}
	}

	indian_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = indian_low_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						highest_held_title_tier = tier_county
						NOR = {
							# has_dynasty = no
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						portrait_indian_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							highest_held_title_tier = tier_county
							NOR = {
								# has_dynasty = no
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_indian_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	indian_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = indian_high_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average
			}
		}		
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						OR = {
							highest_held_title_tier > tier_county
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						NOT = { AND = { is_ruler = yes has_government = mercenary_government  } } # Blocked for mercenaries
						portrait_indian_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							OR = {
								highest_held_title_tier > tier_county
								AND = {
								has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_indian_clothing_trigger = yes
						}
					}
				}				

			}
		}
	}

	indian_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = indian_war_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 101
				portrait_wear_armor_trigger = yes
				portrait_indian_clothing_trigger = yes
			}
		}
	}

## DDE ABBASID ##

	dde_abbasid_commoners = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = dde_abbasid_commoner_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 40
				highest_held_title_tier < tier_county
				NOR = {
					AND = {
						exists = primary_spouse
						primary_spouse = {
							highest_held_title_tier > tier_county
						}
					}
					has_government = republic_government
					AND = { is_ruler = yes has_government = theocracy_government }
				}
				portrait_dde_abbasid_clothing_trigger = yes
			}
		}
	}

	dde_abbasid_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = dde_abbasid_low_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						highest_held_title_tier = tier_county
						NOR = {
							# has_dynasty = no
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						portrait_dde_abbasid_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							highest_held_title_tier = tier_county
							NOR = {
								# has_dynasty = no
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_dde_abbasid_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	dde_abbasid_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = dde_abbasid_high_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}		
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						OR = {
							highest_held_title_tier > tier_county
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						NOT = { AND = { is_ruler = yes has_government = mercenary_government  } } # Blocked for mercenaries
						portrait_dde_abbasid_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							OR = {
								highest_held_title_tier > tier_county
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_dde_abbasid_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	dde_abbasid_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = dde_abbasid_war_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 102 # slightly stronger than mena war
				portrait_wear_armor_trigger = yes
				portrait_dde_abbasid_clothing_trigger = yes
			}
		}
	}

## MENA ##

	mena_commoners = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = mena_commoner_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 40
				highest_held_title_tier < tier_county
				NOR = {
					AND = {
						exists = primary_spouse
						primary_spouse = {
							highest_held_title_tier > tier_county
						}
					}
					has_government = republic_government
					AND = { is_ruler = yes has_government = theocracy_government }
				}
				portrait_mena_clothing_trigger = yes
			}
		}
	}

	mena_mayors = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = mena_low_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				highest_held_title_tier < tier_county
				has_government = republic_government
				portrait_mena_clothing_trigger = yes
			}
		}
	}

	mena_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = mena_low_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						highest_held_title_tier = tier_county
						NOR = {
							# has_dynasty = no
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						portrait_mena_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							highest_held_title_tier = tier_county
							NOR = {
								# has_dynasty = no
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_mena_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	mena_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = mena_high_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}		
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						OR = {
							highest_held_title_tier > tier_county
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						NOT = { AND = { is_ruler = yes has_government = mercenary_government  } } # Blocked for mercenaries
						portrait_mena_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							OR = {
								highest_held_title_tier > tier_county
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_mena_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	mena_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = mena_war_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 101
				portrait_wear_armor_trigger = yes
				portrait_mena_clothing_trigger = yes
			}
		}
	}

	mena_prison = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = mena_prison
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 500
				has_trait = peasant_leader
				OR = {
					is_ruler = no
					is_leading_faction_type = peasant_faction
					AND = {
						is_ruler = yes
						is_landed = no
						OR = {
							has_government = feudal_government
							has_government = clan_government
						}
					}
				}
				
				OR = {
					portrait_mena_clothing_trigger = yes
					portrait_indian_clothing_trigger = yes
					portrait_steppe_clothing_trigger = yes
					portrait_african_clothing_trigger = yes
				}
			}
			modifier = {
				add = 110
				is_imprisoned = yes
				is_in_prison_type = dungeon
				OR = {
					portrait_mena_clothing_trigger = yes
					portrait_indian_clothing_trigger = yes
					portrait_steppe_clothing_trigger = yes
					portrait_african_clothing_trigger = yes
				}
			}
		}
	}

	mena_sickness = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = mena_sickness
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 110
				has_short_disease_trigger = yes #affliction that would plausibly leave them bedridden for treatment
				OR = {
					portrait_mena_clothing_trigger = yes
					portrait_indian_clothing_trigger = yes
					portrait_steppe_clothing_trigger = yes
					portrait_african_clothing_trigger = yes
				}
			}
		}
	}


	mena_stealth = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = mena_stealth
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 110
				has_character_flag = use_stealth_clothes
				OR = {
					portrait_mena_clothing_trigger = yes
					portrait_indian_clothing_trigger = yes
					portrait_steppe_clothing_trigger = yes
					portrait_african_clothing_trigger = yes
				}
			}
		}
	}
	

## Steppe ##

	steppe_commoners = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = steppe_commoner_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 20
				highest_held_title_tier < tier_county
				NOR = {
					AND = {
						exists = primary_spouse
						primary_spouse = {
							highest_held_title_tier > tier_county
						}
					}
					AND = {
						has_government = republic_government
						primary_title.tier > 1
					}
					AND = { is_ruler = yes has_government = theocracy_government }
				}
				portrait_steppe_clothing_trigger = yes
			}
		}
	}

	steppe_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = steppe_low_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						highest_held_title_tier = tier_county
						NOR = {
							# has_dynasty = no
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						portrait_steppe_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							highest_held_title_tier = tier_county
							NOR = {
								# has_dynasty = no
								AND = {
								has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_steppe_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	steppe_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = steppe_high_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}		
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						OR = {
							highest_held_title_tier > tier_county
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						NOT = { AND = { is_ruler = yes has_government = mercenary_government  } } # Blocked for mercenaries
						portrait_steppe_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							OR = {
								highest_held_title_tier > tier_county
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_steppe_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	steppe_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = steppe_war_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 101
				portrait_wear_armor_trigger = yes
				portrait_steppe_clothing_trigger = yes
			}
		}
	}

## Northern Pagans ##

	northern_commoners = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = northern_commoner_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				highest_held_title_tier < tier_county
				NOR = {
					AND = {
						exists = primary_spouse
						primary_spouse = {
							highest_held_title_tier > tier_county
						}
					}
					AND = {
						has_government = republic_government
						primary_title.tier > 1
					}
					AND = { is_ruler = yes has_government = theocracy_government }
				}
				portrait_northern_clothing_trigger = yes
			}
		}
	}

	northern_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = northern_low_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						highest_held_title_tier = tier_county
						NOR = {
							# has_dynasty = no
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						portrait_northern_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							highest_held_title_tier = tier_county
							NOR = {
								# has_dynasty = no
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_northern_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	northern_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = northern_high_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}		
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						OR = {
							highest_held_title_tier > tier_county
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						NOT = { AND = { is_ruler = yes has_government = mercenary_government  } } # Blocked for mercenaries
						portrait_northern_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							OR = {
								highest_held_title_tier > tier_county
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_northern_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	northern_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = northern_war_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 101
				portrait_wear_armor_trigger = yes
				portrait_northern_clothing_trigger = yes
			}
		}
	}


## Sub-Saharan Africans ##

	sub_saharan_commoners = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = sub_saharan_commoner_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				highest_held_title_tier < tier_county
				NOR = {
					AND = {
						exists = primary_spouse
						primary_spouse = {
							highest_held_title_tier > tier_county
						}
					}
					AND = {
						has_government = republic_government
						primary_title.tier > 1
					}
					AND = { is_ruler = yes has_government = theocracy_government }
				}
				portrait_african_clothing_trigger = yes
			}
		}
	}

	sub_saharan_low_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = sub_saharan_low_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						highest_held_title_tier = tier_county
						NOR = {
							has_dynasty = no
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						portrait_african_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							highest_held_title_tier = tier_county
							NOR = {
								has_dynasty = no
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_african_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	sub_saharan_high_nobles = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = sub_saharan_high_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}		
		weight = {
			base = 0
			modifier = {
				add = 50
				OR = {
					AND = {
						OR = {

							highest_held_title_tier > tier_county
							AND = {
								has_government = republic_government
								primary_title.tier > 1
							}
							AND = { is_ruler = yes has_government = theocracy_government }
						}
						NOT = { AND = { is_ruler = yes has_government = mercenary_government  } } # Blocked for mercenaries
						portrait_african_clothing_trigger = yes
					}
					AND = {
						exists = primary_spouse
						OR = {
							is_ruler = no
							highest_held_title_tier = tier_barony
						}
						primary_spouse = {
							OR = {
								highest_held_title_tier > tier_county
								AND = {
									has_government = republic_government
									primary_title.tier > 1
								}
								AND = { is_ruler = yes has_government = theocracy_government }
							}
							portrait_african_clothing_trigger = yes
						}
					}
				}

			}
		}
	}

	sub_saharan_war = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = sub_saharan_war_nobility_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}	
		weight = {
			base = 0
			modifier = {
				add = 101
				portrait_wear_armor_trigger = yes
				portrait_african_clothing_trigger = yes
			}
		}
	}


## Orthodox ##

	religious_orthodox_high_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_orthodox_high_clothes
	            range = { 0 1 }
	        }
	        morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    outfit_tags = { bishop_outfit }
	    weight = {
	        base = 0
	        modifier = {
				add = 120
				OR = {
					is_theocratic_lessee = yes
					AND = { is_ruler = yes has_government = theocracy_government }
				}
				OR = {
					faith = faith:orthodox
					faith = faith:armenian_apostolic
					faith = faith:coptic
					faith = faith:messalian
					faith = faith:bogomilist
					faith = faith:paulician
					faith = faith:nestorian
				}
				NOT = {
					faith.religious_head = this
				}
				NOT = {
					faith = {
						has_doctrine_parameter = vows_of_poverty_active
					}
				}
			}
	    }
	}

	religious_orthodox_head_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_orthodox_head_clothes
	            range = { 0 1 }
	        }
	        morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    weight = {
	        base = 0
	        modifier = {
	            add = 150
				OR = {
					faith = faith:orthodox
					faith = faith:armenian_apostolic
					faith = faith:coptic
					faith = faith:messalian
					faith = faith:bogomilist
					faith = faith:paulician
					faith = faith:nestorian
				}
				exists = primary_title
				primary_title = {
					exists = controlled_faith
				}
				NOT = {
					faith = {
						has_doctrine_parameter = vows_of_poverty_active
					}
				}
	        }
	    }
	}	


## Catholic ##	

	religious_catholic_devoted_clothes = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = religious_catholic_devoted_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			accessory = {
				mode = modify
				gene = hairstyles
				template = catholic_devoted_hairstyles
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}
		outfit_tags = { monk_outfit }
		weight = {
			base = 0
			modifier = {
				add = 100
				OR = {
					has_trait = devoted
					AND = {
						faith = {
							has_doctrine_parameter = vows_of_poverty_active
						}
						OR = {
							AND = {
								has_council_position = councillor_court_chaplain
								faith = {
									has_doctrine = doctrine_theocracy_lay_clergy
								}
							}
							is_theocratic_lessee = yes
							AND = { is_ruler = yes has_government = theocracy_government }
						}
					}
				}
				religion = religion:christianity_religion
			}
		}
	}

	religious_catholic_high_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_catholic_high_clothes
	            range = { 0 1 }
	        }
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    outfit_tags = { bishop_outfit }
	    weight = {
	        base = 0
	        modifier = {
				add = 110
				OR = {
					is_theocratic_lessee = yes
					AND = { is_ruler = yes has_government = theocracy_government }
				}
				religion = religion:christianity_religion
				NAND = {
					faith = faith:catholic
					faith.religious_head = this
				}
				NOT = {
					faith = faith:orthodox
				}
				NOT = {
					faith = {
						has_doctrine_parameter = vows_of_poverty_active
					}
				}
			}
	    }
	}

	religious_catholic_head_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_catholic_head_clothes
	            range = { 0 1 }
	        }
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    weight = {
	        base = 0
	        modifier = {
	            add = 120
				faith = faith:catholic
				exists = primary_title
				primary_title = {
					exists = controlled_faith
				}
				NOT = {
					faith = {
						has_doctrine_parameter = vows_of_poverty_active
					}
				}
	        }
	    }
	}

## Jewish ##

	religious_jewish_head_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_jewish_head_clothes
	            range = { 0 1 }
	        }
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    weight = {
	        base = 0
	        modifier = {
	            add = 120
				is_ruler = yes
				faith.religion = religion:judaism_religion
				exists = primary_title
				primary_title = {
					exists = controlled_faith
				}
	        }
	    }
	}		




## Muslim ##

	religious_muslim_devoted_clothes = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = mena_commoner_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 100
				has_trait = devoted
				religion = religion:islam_religion
			}
		}
	}

	religious_muslim_high_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_muslim_high_clothes
	            range = { 0 1 }
	        }
	        morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    weight = {
	        base = 0
	        modifier = {
				add = 111
				
				OR = {
					is_theocratic_lessee = yes
					AND = { is_ruler = yes has_government = theocracy_government }
					has_council_position = councillor_court_chaplain
				}
				religion = religion:islam_religion
			}
	    }
	}

	# religious_muslim_head_clothes = {
	#     dna_modifiers = {
	#         accessory = {
	#             mode = add
	#             gene = clothes
	#             template = religious_muslim_high_clothes
	#             range = { 0 1 }
	#         }
	#     }
	#     weight = {
	#         base = 0
	#         modifier = {
	#             add = 100
	# 			is_ruler = yes
	# 			primary_title = {
	# 				exists = controlled_faith
	# 				controlled_faith = faith:orthodox
	# 			}
	#         }
	#     }
	# }	

## Northern ##

	religious_northern_high_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_northern_high_clothes
	            range = { 0 1 }
	        }
	        morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    weight = {
	        base = 0
	        modifier = {
				add = 100
				OR = {
					is_theocratic_lessee = yes
					AND = { is_ruler = yes has_government = theocracy_government }
					has_council_position = councillor_court_chaplain
				}
				OR = {
					religion = religion:germanic_religion
					religion = religion:baltic_religion
					religion = religion:finno_ugric_religion
					religion = religion:paganism_religion
					religion = religion:slavic_religion
				}
				
			}
	    }
	}


## Steppe ##

	religious_steppe_high_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_steppe_high_clothes
	            range = { 0 1 }
	        }
	        morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    weight = {
	        base = 0
	        modifier = {
				add = 100
				OR = {
					is_theocratic_lessee = yes
					AND = { is_ruler = yes has_government = theocracy_government }
					has_council_position = councillor_court_chaplain
				}
				OR = {
					religion = religion:tengrism_religion
					religion = religion:qiangic_religion
				}
			}
	    }
	}

## Buddhist ##

	religious_buddhist_devoted_clothes = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = religious_buddhist_high_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 100
				has_trait = devoted
				OR = {
					religion = religion:buddhism_religion
					religion = religion:bon_religion
					religion = religion:taoism_religion
				}
			}
		}
	}

	religious_buddhist_high_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_buddhist_high_clothes
	            range = { 0 1 }
	        }
	        morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    weight = {
	        base = 0
	        modifier = {
				add = 110
				OR = {
					is_theocratic_lessee = yes
					AND = { is_ruler = yes has_government = theocracy_government }
					has_council_position = councillor_court_chaplain
				}
				OR = {
					religion = religion:buddhism_religion
					religion = religion:bon_religion
					religion = religion:taoism_religion
				}
			}
	    }
	}

## Hinduist ##

	religious_hindu_devoted_clothes = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = religious_hindu_devoted_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 100
				has_trait = devoted
				OR = {
					religion = religion:hinduism_religion
				}
			}
		}
	}

	religious_hindu_high_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_hindu_devoted_clothes
	            range = { 0 1 }
	        }
	        morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    weight = {
	        base = 0
	        modifier = {
				add = 110
				OR = {
					is_theocratic_lessee = yes
					AND = { is_ruler = yes has_government = theocracy_government }
					has_council_position = councillor_court_chaplain
				}
				OR = {
					religion = religion:hinduism_religion
				}
			}
	    }
	}

## Zoroastrian ##

	religious_zoroastrian_high_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_zoroastrian_high_clothes
	            range = { 0 1 }
	        }
	        morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    weight = {
	        base = 0
	        modifier = {
				add = 100
				OR = {
					is_theocratic_lessee = yes
					AND = { is_ruler = yes has_government = theocracy_government }
					has_council_position = councillor_court_chaplain
				}
				OR = {
					religion = religion:zoroastrianism_religion
					religion = religion:yazidi_religion
					religion = religion:zunism_religion
					faith = faith:mandeaism
					religion = religion:dualism_religion
				}
			}
	    }
	}


## Jewish ##

	religious_jewish_high_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_jewish_high_clothes
	            range = { 0 1 }
	        }
	        morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    weight = {
	        base = 0
	        modifier = {
				add = 110
				OR = {
					is_theocratic_lessee = yes
					AND = { is_ruler = yes has_government = theocracy_government }
					has_council_position = councillor_court_chaplain
				}
				OR = {
					religion = religion:judaism_religion
					religion = religion:hellenism_religion
				}
			}
	    }
	}


## Jain ##

	religious_jain_devoted_clothes = {
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = religious_jain_high_clothes
				range = { 0 1 } # For the randomness to work correctly
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 100
				has_trait = devoted
				OR = {
					religion = religion:jainism_religion
				}
			}
		}
	}

	religious_jain_high_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_jain_high_clothes
	            range = { 0 1 }
	        }
	        morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
	    }
	    weight = {
	        base = 0
	        modifier = {
				add = 110
				OR = {
					is_theocratic_lessee = yes
					AND = { is_ruler = yes has_government = theocracy_government }
					has_council_position = councillor_court_chaplain
				}
				OR = {
					religion = religion:jainism_religion
				}
			}
	    }
	}

## African Pagan ##

	# religious_african_devoted_clothes = {
	# 	dna_modifiers = {
	# 		accessory = {
	# 			mode = add
	# 			gene = clothes
	# 			template = mena_commoner_clothes
	# 			range = { 0 1 } # For the randomness to work correctly
	# 		}
	# 	}
	# 	weight = {
	# 		base = 0
	# 		modifier = {
	# 			add = 60
	# 			has_trait = devoted
	# 			religion = religion:islam_religion
	# 		}
	# 	}
	# }

	religious_african_high_clothes = {
	    dna_modifiers = {
	        accessory = {
	            mode = add
	            gene = clothes
	            template = religious_african_high_clothes
	            range = { 0 1 }
	        }
	        morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average
			}
	    }
	    weight = {
	        base = 0
	        modifier = {
				add = 100
				OR = {
					is_theocratic_lessee = yes
					AND = { is_ruler = yes has_government = theocracy_government }
					has_council_position = councillor_court_chaplain
				}
				OR = {
					religion = religion:akom_religion
					religion = religion:waaqism_religion
					religion = religion:west_african_religion
					religion = religion:west_african_bori_religion
					religion = religion:west_african_roog_religion
					religion = religion:kushitism_religion
				}
			}
	    }
	}

	# religious_muslim_head_clothes = {
	#     dna_modifiers = {
	#         accessory = {
	#             mode = add
	#             gene = clothes
	#             template = religious_muslim_high_clothes
	#             range = { 0 1 }
	#         }
	#     }
	#     weight = {
	#         base = 0
	#         modifier = {
	#             add = 60
	# 			is_ruler = yes
	# 			primary_title = {
	# 				exists = controlled_faith
	# 				controlled_faith = faith:orthodox
	# 			}
	#         }
	#     }
	# }	

	debbie_lane = { # To make sure Debbie gets the nicer looking clothes!
		dna_modifiers = {
			accessory = {
				mode = add
				gene = clothes
				template = northern_low_nobility_clothes
				value = 0.1 
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_bust
				value = 1.0
				template = bust_clothes
			}
			morph = {
				mode = modify_multiply
				gene = gene_bs_body_shape
				value = 1.0
				template = body_shape_average_clothed
			}
		}
		weight = {
			base = 0
			modifier = {
				add = 200
				exists = character:easteregg_debbie_lane
				this = character:easteregg_debbie_lane
			}
		}
	}

	# northern_commoners = {
	# 	dna_modifiers = {
	# 		accessory = {
	# 			mode = add
	# 			gene = clothes
	# 			template = northern_commoner_clothes
	# 			range = { 0 1 } # For the randomness to work correctly
	# 		}
	# 		morph = {
	# 			mode = modify_multiply
	# 			gene = gene_bs_bust
	# 			value = 1.0
	# 			template = bust_clothes
	# 		}
	# 		morph = {
	# 			mode = modify_multiply
	# 			gene = gene_bs_body_shape
	# 			value = 1.0
	# 			template = body_shape_average_clothed
	# 		}
	# 	}	
	# 	weight = {
	# 		base = 0
	# 		modifier = {
	# 			add = 50
	# 			highest_held_title_tier < tier_county
	# 			NOR = {
	# 				AND = {
	# 					exists = primary_spouse
	# 					primary_spouse = {
	# 						highest_held_title_tier > tier_county
	# 					}
	# 				}
	# 				AND = {
	# 					has_government = republic_government
	# 					primary_title.tier > 1
	# 				}
	# 				AND = { is_ruler = yes has_government = theocracy_government }
	# 			}
	# 			portrait_northern_clothing_trigger = yes
	# 		}
	# 	}
	# }


}